﻿@model ZoomLa.SQLDAL.SQL.PageSetting
@using ZoomLa.BLL
@using System.Data
@using ZoomLa.Common
@{ 
    Model.cols = 6;
    B_Exam_Class classBll = new B_Exam_Class();
}
@functions{
    public string GetModus(string type)
    {
        if (type == "1")
        {
            return "固定试卷（手工）";
        }
        if (type == "2")
        {
            return "固定试卷（随机）";
        }
        if (type == "3")
        {
            return "随机试卷";
        }
        else
        {
            return "";
        }
    }
    public string GetRType(string type)
    {
        if (type == "1")
        {
            return "自动阅卷";
        }
        else
        {
            return "手动阅卷";
        }
    }
}
<table id="EGV" class="table table-striped table-bordered table-hover">
    <tr>
        <th></th>
        <th>试卷标题</th>
        <th>科目</th>
        <th>出题方式</th>
        <th>阅卷方式</th>
        <th>操作</th>
    </tr>
    @if (Model.itemCount > 0)
    {
        foreach (DataRow dr in Model.dt.Rows)
        {
            <tr ondblclick="location.href = 'Papers_System_Add?id=@dr["ID"]';" title="双击修改试卷" >
                <td><input type="checkbox" name="idchk" value="@dr["ID"]" /></td>
                <td>@dr["p_name"]</td>
                <td>@classBll.GetSelect(DataConverter.CLng(dr["p_class"])).C_ClassName</td>
                <td>@GetModus(dr["p_type"].ToString())</td>
                <td>@GetRType(dr["p_rtype"].ToString())</td>
                <td>
                    <a href="Papers_System_Add?id=@dr["ID"]" class="option_style">修改试卷</a>
                    <a href="Paper_QuestionManage?pid=@dr["ID"]" class="option_style">题目列表</a>
                    <a href="ViewPaperCenter?id=@dr["ID"]" class="option_style" target="_blank">浏览试卷</a>
                </td>
            </tr>
        }
    }
    else
    {
        <tr>
            <td colspan="6">当前没有数据</td>
        </tr>
    }
    @Html.Partial("_page", Model)
</table>
